package com.itheima.service.impl.oms;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.oms.OrderVoMapper;
import com.itheima.pojo.oms.OmsOrder;
import com.itheima.pojo.oms.OmsOrderItem;
import com.itheima.pojo.oms.OmsOrderOperateHistory;
import com.itheima.pojo.oms.vo.OmsOrderVo;
import com.itheima.pojo.oms.vo.OrderVo;
import com.itheima.service.oms.OmsOrderItemService;
import com.itheima.service.oms.OmsOrderOperateHistoryService;
import com.itheima.service.oms.OmsOrderService;
import com.itheima.service.oms.OrderVoService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class OrderVoServiceImpl extends ServiceImpl<OrderVoMapper, OrderVo> implements OrderVoService {
    @Override
    public OrderVo listall(OmsOrder orders, List<OmsOrderItem> orderItems, List<OmsOrderOperateHistory> omsOrderOperateHistories) {
        OrderVo orderVo = new OrderVo();
        orderVo.setOrderSn(orders.getOrderSn());
        orderVo.setNote(orders.getNote());
        orderVo.setStatus(orders.getStatus());
        orderVo.setAutoConfirmDay(orders.getAutoConfirmDay());
        orderVo.setBillContent(orders.getBillContent());
        orderVo.setBillHeader(orders.getBillHeader());
        orderVo.setBillReceiverEmail(orders.getBillReceiverEmail());
        orderVo.setBillReceiverPhone(orders.getBillReceiverPhone());
        orderVo.setBillType(orders.getBillType());
        orderVo.setCommentTime(orders.getCommentTime());
        orderVo.setConfirmStatus(orders.getConfirmStatus());
        orderVo.setCouponAmount(orders.getCouponAmount());
        orderVo.setCouponId(orders.getCouponId());
        orderVo.setCreateTime(orders.getCreateTime());
        orderVo.setDeleteStatus(orders.getDeleteStatus());
        orderVo.setDeliveryCompany(orders.getDeliveryCompany());
        orderVo.setDeliverySn(orders.getDeliverySn());
        orderVo.setDeliveryTime(orders.getDeliveryTime());
        orderVo.setDiscountAmount(orders.getDiscountAmount());
        orderVo.setFreightAmount(orders.getFreightAmount());
        orderVo.setGrowth(orders.getGrowth());
        orderVo.setId(orders.getId());
        orderVo.setIntegration(orders.getIntegration());
        orderVo.setIntegrationAmount(orders.getIntegrationAmount());
        orderVo.setMemberId(orders.getMemberId());
        orderVo.setMemberUsername(orders.getMemberUsername());
        orderVo.setModifyTime(orders.getModifyTime());
        orderVo.setOrderType(orders.getOrderType());
        orderVo.setPayAmount(orders.getPayAmount());
        orderVo.setPaymentTime(orders.getPaymentTime());
        orderVo.setPayType(orders.getPayType());
        orderVo.setPromotionAmount(orders.getPromotionAmount());
        orderVo.setPromotionInfo(orders.getPromotionInfo());
        orderVo.setReceiverCity(orders.getReceiverCity());
        orderVo.setReceiverDetailAddress(orders.getReceiverDetailAddress());
        orderVo.setReceiverName(orders.getReceiverName());
        orderVo.setReceiverPhone(orders.getReceiverPhone());
        orderVo.setReceiverPostCode(orders.getReceiverPostCode());
        orderVo.setReceiverProvince(orders.getReceiverProvince());
        orderVo.setReceiverRegion(orders.getReceiverRegion());
        orderVo.setReceiveTime(orders.getReceiveTime());
        orderVo.setSourceType(orders.getSourceType());
        orderVo.setTotalAmount(orders.getTotalAmount());
        orderVo.setUseIntegration(orders.getUseIntegration());

        orderVo.setOrderItemList(orderItems);
        orderVo.setHistoryList(omsOrderOperateHistories);


        return orderVo;
    }



}
